package com.example.opengl.render.cube

import com.alibaba.android.arouter.facade.annotation.Route
import com.android.baselibrary.base.BaseActivity
import com.example.opengl.R
import com.example.opengl.databinding.ActivityOpenglRenderCircleBinding
import com.example.opengl.main.OpenGLPath
import com.example.opengl.render.circle.CircleDrawer
import com.example.opengl.render.triangle.TriangleRender

/**
 * @author: Mr.You
 * @create: 2023-07-27 16:44
 * @description:绘制正方体
 **/
@Route(path = OpenGLPath.OPENGL_RENDER_CUBE)
class OpenGLRenderCubeActivity : BaseActivity<ActivityOpenglRenderCircleBinding>() {

    override fun getLayoutId(): Int = R.layout.activity_opengl_render_circle

    override fun initView() {
        mBinding.glSurface.run {
            setEGLContextClientVersion(2)
            setRenderer(TriangleRender().apply {
                addDrawerRender(CubeDrawer())
            })
        }
    }

    override fun initListener() {

    }
}